package com.tarena.security.admin.persistis.repository;

import com.tarena.security.admin.dao.AppMapper;
import com.tarena.security.admin.entity.db.App;
import com.tarena.security.admin.entity.param.AppParam;
import com.tarena.security.admin.entity.query.AppQuery;
import com.tarena.security.admin.persists.repository.AppRepository;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * app Mapper 接口
 * </p>
 *
 * @author Ly
 * @since 2023-04-10
 */
@Repository
public class AppRepositoryImpl implements AppRepository {

    @Resource
    private AppMapper appMapper;

    @Override public int addNewApp(App app) {
        int i=appMapper.addNewApp(app);
        return i;
    }

    @Override public int getAppCountByName(String name) {
        return appMapper.getAppCountByName(name);
    }

    @Override public List<App> getAppList(AppQuery query) {
        return appMapper.getAppList(query);
    }

    @Override public App getAppById(Integer id) {
        return appMapper.getAppById(id);
    }

    @Override public int updateByID(App app) {
        return appMapper.updateByID(app);
    }

    @Override public int deleteById(Integer[] id) {
        return appMapper.deleteById(id);
    }
}
